using System;
using System.Globalization;

namespace TeamTasker.Utils
{
    public class NumberUtils
    {

        public static bool IsNumber(string str)
        {
            if (str == null || str.Length == 0)
            {
                return false;
            }
            if (str[0] == '+' || str[0] == '-')
            {
                str = str.Substring(1);
            }
            double res;
            return double.TryParse(str, out res);
        }

        public static bool IsDigit(char ch)
        {
            return (ch >= '0' && ch <= '9');
        }

        public static bool IsDot(char ch)
        {
            return (ch == '.' || ch == ',');
        }

    }
}
